package opera;

import book.BookList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2022-12-05
 * Time: 15:44
 */
public class ShowOperation implements IOperation{

    @Override
    public void Work(BookList bookList) {
        System.out.println("打印出所有图书！");
        int curSize = bookList.getUseSize();
        for (int i = 0; i < curSize; i++) {
            //toString已经重写，所以可以直接打印
            System.out.println(bookList.getBooks(i));
        }
    }
}
